<?php foreach ($templates as $template) :?>

<tr>
    <td>
       <?= $template['name']?>
    </td>
    <td>
        <?= $template['remark']?>
    </td>
    <td>
        <?= TimeUtil::showtime($template["createtime"] , TimeUtil::TIME_ZONE_GMT8) ?>
    </td>

    <td>

        <?php if ($project_user_relation['role'] != AppConstants::PROJECT_ROLE_INTERPRETER) :?>

        <a href="javascript:deleteTemplate(<?=$template['id']?>, '<?=$template['name']?>')" class="btn btn-danger btn-sm"><i class="fa fa-trash"></i> 删除 </a>
        <a href="javascript:openTemplateDialog('edit', <?=$template['id']?>)" class="btn btn-white btn-sm"><i class="fa fa-pencil"></i> 编辑 </a>
        <?php  else: ?>
             --
        <?php endif;?>
    </td>
</tr>
<?php endforeach;?>